package edu.ynu.se.xiecheng.achitectureclass.dao;

import edu.ynu.se.xiecheng.achitectureclass.entity.Device;
import edu.ynu.se.xiecheng.achitectureclass.entity.PhosphorusData;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface PhosphorusDataRepository extends JpaRepository<PhosphorusData, Long> {
    List<PhosphorusData> findByCreateTimeBetween(Date start, Date end);
    List<PhosphorusData> findByDeviceOrderByCreateTimeDesc(Device device);
} 